package com.kxs.stu_manager.global;

/**
 * @ClassName User
 * @Description: TODO 用户类
 * @Author: 2119475835@qq.com
 * @Date: 2023/1/9
 */
public class User {
    private int id; // id
    private String userName; // 用户名
    private String password; // 密码
    private String competence; // 权限 0：超级管理员 1：普通管理员 2：普通用户
    /**
     * 0：超级管理员   增删改查
     * 1：普通管理员   增查
     * 2：普通用户     查
     */
    public User() {
    }

    public User(int id, String userName, String competence) {
        this.id = id;
        this.userName = userName;
        this.competence = competence;
    }

    public User(String userName, String password) {
        this.userName = userName;
        this.password = password;
    }

    public User(int id, String userName, String password, String competence) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.competence = competence;
    }

    public User(String userName, String password, String competence) {
        this.userName = userName;
        this.password = password;
        this.competence = competence;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCompetence() {
        return competence;
    }

    public void setCompetence(String competence) {
        this.competence = competence;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", competence='" + competence + '\'' +
                '}';
    }
}
